package com.sinevil.tcpTrans.utils.fileTrans.fileUpload;

import com.sinevil.tcpTrans.entity.json.InstructionJson;

/**
 * @Classname FileUploadInfo
 * @Description TODO
 * @Version 1.0.0
 * @Date 2025/1/19 17:28
 * @Created by sinevil
 */

public class FileUploadInfo {
    //本次任务唯一标识;
    public String UID;
    // 文件大小
    public long size;
    // 文件名称（包含后缀）
    public String name;
    public String path;

    public FileUploadInfo(String UID, long size, String name, String path) {
        this.UID = UID;
        this.size = size;
        this.name = name;
        this.path = path;
    }

    @Override
    public String toString() {
        return "FileUploadInfo{" +
                "UID='" + UID + '\'' +
                ", size=" + size +
                ", name='" + name + '\'' +
                ", path='" + path + '\'' +
                '}';
    }

    public String toInstructionContent() {
        return String.format(InstructionJson.PUBLIC_FILE_INFO_FORMAT,UID,size,name,path);
    }
}
